package day20;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

/**
 * 题目：字符串反转
 * 左右指针交换
 * 题目链接;https://www.nowcoder.com/practice/e45e078701ab4e4cb49393ae30f1bb04?tpId=37&&tqId=21235&rp=1&ru=/activity/oj&qru=/ta/huawei/question-ranking
 */
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        String str;
        while ((str = bufferedReader.readLine()) != null) {
            char[] chars = str.toCharArray();
            int begin = 0;
            int end = chars.length-1;
            while (begin < end) {
                char tmp = chars[begin];
                chars[begin] = chars[end];
                chars[end] = tmp;
                begin++;
                end--;
            }
            System.out.println(chars);
        }
    }
}
